<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>UDT Reference</title>
</head>

<body>

<h1><font face="Verdana" size="4">Simulating UDT on NS-2</font></h1>
<p><font face="Verdana" size="2">
<a target="_blank" href="http://www.isi.edu/nsnam/ns/">NS-2</a> Simulation 
module and scripts are  available in the <font color="#000080">./sim</font> 
directory.</font></p>

<p><font face="Verdana" size="2">The module and simulation scripts work on NS-2 
version 2.26. You may need to make some changes on other versions.</font></p>
<p><font face="Verdana" size="2">Follow the instructions below to install the UDT 
module to your NS-2 installation. Read
<a target="_blank" href="http://www.isi.edu/nsnam/ns/doc/index.html">NS-2 
manuals</a> if necessary.</font></p>
<p><font face="Verdana" size="2"><b>Step 1</b>. make a new dir named
<font color="#000080">udt</font> (optional) under ns directory, e.g.,
<font color="#000080">./ns-allinone-2.26/ns-2.26</font>.</font></p>
<p><font face="Verdana" size="2"><b>Step 2</b>. updates the <i>
<font color="#808000">Makefile</font></i> in the same directory as step 1.</font></p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="table1" bgcolor="#C0C0C0" bordercolor="#C0C0C0">
  <tr>
    <td width="100%">
    <p style="margin-top: 0; margin-bottom: 0"><font face="Verdana" size="1">
    pushback/pushback-queue.o pushback/pushback.o \<br>
    udt/udt.o \&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <font color="#800000">&lt;- add this line</font><br>
    common/parentnode.o trace/basetrace.o \</font></td>
  </tr>
</table>
<p><font face="Verdana" size="2"><b>Step 3</b>. modify <i><font color="#808000">
./ns-allinone-2.26/ns-2.26/common/packet.h</font></i></font></p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="table2" bgcolor="#C0C0C0" bordercolor="#C0C0C0">
  <tr>
    <td width="100%">
    <p style="margin-top: 6; margin-bottom: 6"><font face="Verdana" size="1">
    PT_LMS,<br>
    PT_LMS_SETUP,<br>
    <br>
    // UDT packets<br>
    PT_UDT,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <font color="#800000">&nbsp;&nbsp;&nbsp; &lt;- add this line</font><br>
    <br>
    // insert new packet types here<br>
    PT_NTYPE // This MUST be the LAST one</font></td>
  </tr>
</table>
<p style="margin-top: 6; margin-bottom: 6">&nbsp;</p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="table3" bgcolor="#C0C0C0" bordercolor="#C0C0C0">
  <tr>
    <td width="100%">
    <p style="margin-top: 6; margin-bottom: 6"><font face="Verdana" size="1">
    name_[PT_LMS]=&quot;LMS&quot;;<br>
    name_[PT_LMS_SETUP]=&quot;LMS_SETUP&quot;;<br>
    <br>
    // UDT<br>
    name_[PT_UDT] = &quot;UDT&quot;;<font color="#800000"> &lt;- add this line</font><br>
    <br>
    name_[PT_NTYPE]= &quot;undefined&quot;;</font></td>
  </tr>
</table>
<p><font face="Verdana" size="2"><b>Step 4</b>. modify <i><font color="#808000">
./ns-allinone-2.26/ns-2.26/tcl/lib/ns-packet.tcl</font></i></font></p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="table4" bgcolor="#C0C0C0" bordercolor="#C0C0C0">
  <tr>
    <td width="100%">
    <p style="margin-top: 6; margin-bottom: 6"><font face="Verdana" size="1">
    Pushback<br>
    UDT<font color="#800000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    &lt;- add this line</font><br>
    NV</font></td>
  </tr>
</table>
<p><font face="Verdana" size="2"><b>Step 5</b>. modify .<i><font color="#808000">/ns-allinone-2.26/ns-2.26/tcl/lib/ns-default.tcl</font></i></font></p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="table5" bgcolor="#C0C0C0" bordercolor="#C0C0C0">
  <tr>
    <td width="100%">
    <p style="margin-top: 6; margin-bottom: 6"><font face="Verdana" size="1">
    Agent/TCPSink/QS set RFC2581_immediate_ack_ true<br>
    <br>
    Agent/UDT set mtu_ 1500<font color="#800000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    &lt;- add this line</font><br>
    Agent/UDT set max_flow_window_ 32768<font color="#800000">&nbsp;&nbsp;&nbsp; &lt;- add 
    this line</font><br>
    <br>
    Queue set util_weight_ 0.8</font></td>
  </tr>
</table>
<p><font face="Verdana" size="2"><b>Step 6</b>. re-make NS-2 (in
<font color="#000080">./ns-allinone-2.26/ns-2.26</font>, execute command
<font color="#FF0000">make</font>)</font></p>
<p><font face="Verdana" size="2"><b>Step 7</b>. in <font color="#000080">
./ns-allinone-2.26/ns-2.26/udt</font></font></p>
<p><font face="Verdana" size="2">Execute command <font color="#FF0000">ns 
test.tcl</font> to examine if UDT module has been installed successfully.</font></p>
<p><font face="Verdana" size="2">Use <i><font color="#808000">sim.tcl</font></i> 
for further testing with more topologies, multiple connections, and with 
coexisting TCP connections. Most of our results in technical papers can be 
reproduced by this script. Read this file for detailed information.</font></p>

</body>

</html>
